package com.yuan.mapper;


import com.yuan.bean.LibraryCard;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface LibraryCardMapper {

    //查询当前用户的所有借书
    public List<LibraryCard> selectAllByUserId(Integer userId);

    //通过no查询书籍
    public LibraryCard selectAllByNo(Integer bookNo);

    //还书
    public int returnBook(Integer userId,Integer bookNo,String bookName);

    //借书
    public int borrowBook(Integer userId,String userName,String bookName,String author);

    //更改自增
    public void updateIn();

    //查询所有用户的借书历史记录，还书的和没还书的
    public List<LibraryCard> selectAll(String userName);

    //检查用户的借书时间是否到期
    public List<LibraryCard> outTime(Integer userId);
}
